﻿using Draco.OWF.RT.Engine.Worker;
using System;
using System.Collections.Generic;

namespace Draco.OWF.RT.Engine.Manager
{
    public class JobManager : List<IJob>
    {
        public void LoadJobFromRepository(String repo)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        public IList<IJob> AllRunningJobs
        {
            get
            {
                IList<IJob> jobs = new List<IJob>();
                foreach (IJob job in this)
                {
                    if (job.Status == JobStatus.Running)
                        jobs.Add(job);
                }
                return jobs;
            }
        }
    }
}
